package com.icode.service.order;

import com.icode.core.dto.order.OrderDTO;
import com.icode.core.dto.order.ReFundDTO;
import com.icode.core.model.order.Order;
import com.icode.core.model.order.ReFund;

import javax.persistence.criteria.CriteriaBuilder;
import java.util.List;


/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-1-20
 * Time: 下午2:18
 * To change this template use File | Settings | File Templates.
 */
public interface OrderService {

    Order saveOrUpdateOrder(OrderDTO orderDTO, String houseWeekId);

    OrderDTO createOrder(String houseWeekGuid, String phoneNum);

    List<OrderDTO> findOrderByUsersInfo(String username);

    Order findOrderByGuid(String guid);

    List<ReFundDTO> findAllReFund();

    ReFund findReFundByGuid(String guid);

    ReFund findReFundByTradeNo(String batchNo);

    List<ReFund> findReFundByOrder(Order order);

    Order findOrderByUsersInfoTime(String username, String orderTime);

    void deleteOrdersByGuid(String guid);

    void paySuccessOrderByGuid(String guid, String alipayTradeNo);

    void deleteOrdersByList(String[] guids);

    void revokeOrderByGuid(String guid);

    void revokeOrderAuto();

    void addReFund(ReFund reFund);

    void changeOrderStatusByGuid(String guid, String status);

    void changeReFundStatusByGuid(String guid, String status);

    List<ReFundDTO> findRefundByStatus(String status);

    void initMyHouse(String orderGuid);

    List<OrderDTO> findAllOrder();

    List<OrderDTO> findAllOrderByPage(String currentPage);
}
